<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="layout" content="main"/>
  <title>Edit Profile</title>
  <resource:tabView/>
</head>
<body>
<div class="body">
  <h1>Edit Profile</h1>
  <g:if test="${flash.message}">
    <div class="message">${flash.message}</div>
  </g:if>
  <g:hasErrors bean="${profileInstance}">
    <div class="errors">
      <g:renderErrors bean="${profileInstance}" as="list"/>
    </div>
  </g:hasErrors>
  <g:form method="post" enctype="multipart/form-data">
    <input type="hidden" name="id" value="${profileInstance?.id}"/>
    <input type="hidden" name="version" value="${profileInstance?.version}"/>
    <div class="dialog">
      <richui:tabView id="tabView">
        <richui:tabLabels>
          <richui:tabLabel selected="true" title="Personal"/>
          <richui:tabLabel title="Business"/>
          <richui:tabLabel title="Private"/>
        </richui:tabLabels>
        <richui:tabContents>
          <richui:tabContent>
            <table>
              <tbody>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="user">User name:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'user', 'errors')}">
                  ${profileInstance?.user}
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="photo">Photo:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'photo', 'errors')}">
                  <input type="file" id="photo" name="photo"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="firstName">First Name:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'firstName', 'errors')}">
                  <input type="text" id="firstName" name="firstName" value="${fieldValue(bean: profileInstance, field: 'firstName')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="secondName">Second Name:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'secondName', 'errors')}">
                  <input type="text" id="secondName" name="secondName" value="${fieldValue(bean: profileInstance, field: 'secondName')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="lastName">Last Name:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'lastName', 'errors')}">
                  <input type="text" id="lastName" name="lastName" value="${fieldValue(bean: profileInstance, field: 'lastName')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="birthday">Birthday:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'birthday', 'errors')}">
                  <g:datePicker name="birthday" value="${profileInstance?.birthday}" noSelection="['':'']"></g:datePicker>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="clubFunction">Club Function:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'clubFunction', 'errors')}">
                  <g:select from="${de.motsangria.enums.ClubFunction?.values()}" value="${profileInstance?.clubFunction}" name="clubFunction"></g:select>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="interests">Interests:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'interests', 'errors')}">
                  <input type="text" id="interests" name="interests" value="${fieldValue(bean: profileInstance, field: 'interests')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="jabberId">Jabber Id:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'jabberId', 'errors')}">
                  <input type="text" id="jabberId" name="jabberId" value="${fieldValue(bean: profileInstance, field: 'jabberId')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="twitterId">Twitter Id:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'twitterId', 'errors')}">
                  <input type="text" id="twitterId" name="twitterId" value="${fieldValue(bean: profileInstance, field: 'twitterId')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="facebookId">Facebook Id:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'facebookId', 'errors')}">
                  <input type="text" id="facebookId" name="facebookId" value="${fieldValue(bean: profileInstance, field: 'facebookId')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="xingId">Xing Id:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'xingId', 'errors')}">
                  <input type="text" id="xingId" name="xingId" value="${fieldValue(bean: profileInstance, field: 'xingId')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="linkedinId">Linkedin Id:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'linkedinId', 'errors')}">
                  <input type="text" id="linkedinId" name="linkedinId" value="${fieldValue(bean: profileInstance, field: 'linkedinId')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="dateCreated">Date Created:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'dateCreated', 'errors')}">
                  ${profileInstance?.dateCreated}
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="lastUpdated">Last Updated:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'lastUpdated', 'errors')}">
                  ${profileInstance?.lastUpdated}
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="lastLogin">Last Login:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'lastLogin', 'errors')}">
                  ${profileInstance?.lastLogin}
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="lastAction">Last Action:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'lastAction', 'errors')}">
                  ${profileInstance?.lastAction}
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="lastMedium">Last Medium:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'lastMedium', 'errors')}">
                  ${fieldValue(bean: profileInstance, field: 'lastMedium')}
                </td>
              </tr>

              </tbody>
            </table>
          </richui:tabContent>
          <richui:tabContent>
            <table>
              <tbody>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="position">Position:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'position', 'errors')}">
                  <input type="text" id="position" name="position" value="${fieldValue(bean: profileInstance, field: 'position')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="company">Company:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'company', 'errors')}">
                  <input type="text" id="company" name="company" value="${fieldValue(bean: profileInstance, field: 'company')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="businessStreet">Business Street:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'businessStreet', 'errors')}">
                  <input type="text" id="businessStreet" name="businessStreet" value="${fieldValue(bean: profileInstance, field: 'businessStreet')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="businessPostCode">Business Post Code:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'businessPostCode', 'errors')}">
                  <input type="text" id="businessPostCode" name="businessPostCode" value="${fieldValue(bean: profileInstance, field: 'businessPostCode')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="businessPlace">Business Place:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'businessPlace', 'errors')}">
                  <input type="text" id="businessPlace" name="businessPlace" value="${fieldValue(bean: profileInstance, field: 'businessPlace')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="businessState">Business State:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'businessState', 'errors')}">
                  <input type="text" id="businessState" name="businessState" value="${fieldValue(bean: profileInstance, field: 'businessState')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="businessCountry">Business Country:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'businessCountry', 'errors')}">
                  <input type="text" id="businessCountry" name="businessCountry" value="${fieldValue(bean: profileInstance, field: 'businessCountry')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="businessWebSite">Business Web Site:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'businessWebSite', 'errors')}">
                  <input type="text" id="businessWebSite" name="businessWebSite" value="${fieldValue(bean: profileInstance, field: 'businessWebSite')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="businessPhone">Business Phone:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'businessPhone', 'errors')}">
                  <input type="text" id="businessPhone" name="businessPhone" value="${fieldValue(bean: profileInstance, field: 'businessPhone')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="businessMobile">Business Mobile:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'businessMobile', 'errors')}">
                  <input type="text" id="businessMobile" name="businessMobile" value="${fieldValue(bean: profileInstance, field: 'businessMobile')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="businessFax">Business Fax:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'businessFax', 'errors')}">
                  <input type="text" id="businessFax" name="businessFax" value="${fieldValue(bean: profileInstance, field: 'businessFax')}"/>
                </td>
              </tr>

              </tbody>
            </table>
          </richui:tabContent>
          <richui:tabContent>
            <table>
              <tbody>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="privateStreet">Private Street:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'privateStreet', 'errors')}">
                  <input type="text" id="privateStreet" name="privateStreet" value="${fieldValue(bean: profileInstance, field: 'privateStreet')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="privatePostCode">Private Post Code:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'privatePostCode', 'errors')}">
                  <input type="text" id="privatePostCode" name="privatePostCode" value="${fieldValue(bean: profileInstance, field: 'privatePostCode')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="privatePlace">Private Place:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'privatePlace', 'errors')}">
                  <input type="text" id="privatePlace" name="privatePlace" value="${fieldValue(bean: profileInstance, field: 'privatePlace')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="privateState">Private State:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'privateState', 'errors')}">
                  <input type="text" id="privateState" name="privateState" value="${fieldValue(bean: profileInstance, field: 'privateState')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="privateCountry">Private Country:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'privateCountry', 'errors')}">
                  <input type="text" id="privateCountry" name="privateCountry" value="${fieldValue(bean: profileInstance, field: 'privateCountry')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="privateWebSite">Private Web Site:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'privateWebSite', 'errors')}">
                  <input type="text" id="privateWebSite" name="privateWebSite" value="${fieldValue(bean: profileInstance, field: 'privateWebSite')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="privatePictureAlbum">Private Picture Album:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'privatePictureAlbum', 'errors')}">
                  <input type="text" id="privatePictureAlbum" name="privatePictureAlbum" value="${fieldValue(bean: profileInstance, field: 'privatePictureAlbum')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="privatePhone">Private Phone:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'privatePhone', 'errors')}">
                  <input type="text" id="privatePhone" name="privatePhone" value="${fieldValue(bean: profileInstance, field: 'privatePhone')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="privateMobile">Private Mobile:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'privateMobile', 'errors')}">
                  <input type="text" id="privateMobile" name="privateMobile" value="${fieldValue(bean: profileInstance, field: 'privateMobile')}"/>
                </td>
              </tr>

              <tr class="prop">
                <td valign="top" class="name">
                  <label for="privateFax">Private Fax:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean: profileInstance, field: 'privateFax', 'errors')}">
                  <input type="text" id="privateFax" name="privateFax" value="${fieldValue(bean: profileInstance, field: 'privateFax')}"/>
                </td>
              </tr>

              </tbody>
            </table>
          </richui:tabContent>
        </richui:tabContents>
      </richui:tabView>
    </div>
    <div class="buttons">
      <span class="button"><g:actionSubmit class="save" value="Update"/></span>
    </div>
  </g:form>
</div>
</body>
</html>
